
#ifndef ARTIFICIAL_NEURAL_NETWORK
#define ARTIFICIAL_NEURAL_NETWORK

class ArtificialNeuralNetwork{


public:
	ArtificialNeuralNetwork(int numOfLay, int* numOfNeorunsInEachLayer);
	~ArtificialNeuralNetwork();
	
	void	feedForward			(double* input);	
	double	getOutput			(int index);					//gets the output of i th neuron in output layer
	double  getMeanSquareError	(double* target);				//gets the MSE value of the net
	void	loadWights			(double*);
	void	release();
 
	


/***************************************************************************/
	/* Neuron values are stored in a 2D array.Simply, [2][3] means the value of*/
	/*  neuron which is 3th layer and 4th neuron. (indexing starts from 0)     */
	/***************************************************************************/
	double **	m_neuronValues; 


	/***************************************************************************/
	/* weights between neurons.It is represented with a 3D array.Indexing      */
	/* is [2][4][5] means weight between 4th neuron in second hidden layer and */
	/* 5th neuron in the previous (1st) hidden layer.(indexing starts from 0)  */
	/***************************************************************************/
	double ***	m_neuronWeights;


	int			m_numberOfLayers; //including input layer
	int*		m_numOfNeurons;   //number of neurons in each layer


	inline double sigmoid(double inValue);

	void printANN(); //for debugging purpose

};
#endif